home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / newext.doc < prev    next >
Text File  |  1987-08-18  |  1KB  |  39 lines

  1.  
  2.  
  3.         NAME
  4.                 newext -- change a filename extension
  5.  
  6.         SYNOPSIS
  7.                 void newext(old, new, extn);
  8.                 char *old       original filename string
  9.                 char *new       destination for new filename
  10.                 char *extn      new extension string
  11.  
  12.         DESCRIPTION
  13.         This function will make a new filename from an existing
  14.         filename and a specified extension string.  The original
  15.         filename string is left unchanged, since its base is copied to a
  16.         new string area.  Nothing is returned.
  17.  
  18.         EXAMPLE
  19.              char old[] = "FOOBAR.COM";
  20.              char new[14];
  21.  
  22.              newext(old, new, "BIN");
  23.  
  24.  
  25.         After operation, the filename string in "new" will be:
  26.              FOOBAR.BIN
  27.  
  28.         Character strings are NULL terminated.  The original string
  29.         need not have any extension or period terminator, and may
  30.         contain a path specifier.  Note that the destination string
  31.         area must be long enough to hold the new filename.
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMTCx.LIB for the Turbo-C Compiler.
  39.